<?php
$base = "http://" . $_SERVER['SERVER_NAME'];
?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href="<?= $base ?>/bootstrap/css/bootstrap.css" rel="stylesheet" />                        
<link href="<?= $base ?>/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"/>
<script>
    $(function() {
        $("input[name='submit']").click(function() {
            var emailValue = $("input[name='email']").val().length;
            var mobileValue = $("input[name='mobile']").val().length;
            var totalEmpty = 0;
            if (!emailValue) {
                totalEmpty = totalEmpty + 1;
            }
            if (!mobileValue) {
                totalEmpty = totalEmpty + 1;
            }
            if (totalEmpty === 2) {
                alert("You must enter either Email address or Mobile number.");
                return  false;
            }         
        });
    });
</script>
<div id="view-content">
    <div class="row-fluid">        

        <?php
        if ($this->showForm) {
            ?>
            <div class="span12 well">
                <?= $this->form ?>
            </div>
        <?php } else { ?>             
            <?php
            if ($this->isUserNew) {
                ?>   
                <div class="well">
                    <?= $this->form1 ?>
                </div>

            <?php } else { ?>
                <div class="alert alert-info">            
                    <h4>Success:</h4>
                    Message sent successfully.<br>
                </div>       
            <? } ?>
        <?php } ?>        
    </div>    
</div>